<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>swich</title>
    <script>
        function funA(){
            var num = 3
            switch (num){
                case 1:
                    console.log("一")
                    break
                case 2:
                    console.log("二")
                    break
                case 3:
                    console.log("三")
                    break
            }
            console.log('程序结束了')
        }
    </script>
</head>
<body>
    <button onclick="funA()">点击</button>
</body>
</html>